package com.msb.apidriver.feign;

import com.msb.commons.dto.Car;
import com.msb.commons.dto.DriverUser;
import com.msb.commons.response.DriverUserExistsResponse;
import com.msb.commons.response.ResponseResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * @Author: chshh
 * @version: 1.0
 */
@FeignClient("service-driver-user")
public interface ServiceDriverUserClient {
    @PutMapping("/user")
    public ResponseResult updateDriverUser(@RequestBody DriverUser driverUser);

    @GetMapping("/check-driver/{driverPhone}")
    public ResponseResult<DriverUserExistsResponse> getDriverUser(@PathVariable("driverPhone") String driverPhone);

    @GetMapping("/getCar")
    public ResponseResult<Car> getCarById(@RequestParam("carId") Long carId);
}
